// CreateBuilding(startX, startY, length)
instance_create(argument0, argument1, ob_edge);
for (i = 0; i < argument2; i++)
{
 instance_create(argument0 + (i * global.platformWidth), argument1, ob_brick_top);
 instance_create(argument0 + (i * global.platformWidth), argument1, ob_one_way);
 instance_create(argument0 + (i * global.platformWidth) + (global.platformWidth / 2), argument1, ob_one_way);
 if(i % 2 == 0 && i < argument2 +  - 1 * (argument2%2) )
         instance_create(argument0 + ((i + 0.5) * global.platformWidth), argument1 + (global.platformHeight * 0.5) , ob_brick_window);
}

topDown = argument1;
spawnWindows = false;
while(topDown < global.groundLevel)
{
 topDown += global.platformHeight;
 for (i = 0; i < argument2; i++)
     {
        instance_create(argument0 + (i * global.platformWidth), topDown, ob_brick_64x64);
        if(i % 2 == 0 && spawnWindows == true && i < argument2 +  -1 * (argument2%2) && topDown < global.groundLevel - global.platformHeight )
         instance_create(argument0 + ((i + 0.5) * global.platformWidth), topDown, ob_brick_window);
     }
     spawnWindows = !spawnWindows;
}